<div id="shprices">
	<?php echo $this->form ?>
	<?php foreach ($this->offers as $offer):?>
		<div class="bb" style="margin:5px 0;font-size:0.9em;">
			<table>
				<tr>
					<td><em class="bigger strong high"><?php echo $offer->PRICE_AUTHOR?></em>&nbsp;|&nbsp;<em class="nonhigh">Актуально до: <?php echo $offer->PRICE_ACTUALTO;?></em></td>
				</tr>
				<tr>
					<td>
						<?php
							if ($offer->PRICE_CURRENCYID == 'RUB') {
								$currencyShorter = ' руб.';
							} elseif ($offer->PRICE_CURRENCYID == 'UAH') {
								$currencyShorter = ' грн.';
							} else {
								$currencyShorter = '$';
							}
						?>
						<em>Цена</em>: <em class="bigger strong"><?php echo $offer->OFFERS_PRICE . $currencyShorter;?></em>
					</td>
				</tr>
				<tr>
					<td>
						<em>Описание</em>: <?php echo mb_substr($offer->PRICE_DESCR, 0, 400, 'utf-8');?>
					</td>
				</tr>
			</table>
		</div>
	<?php endforeach;?>
</div>
<script type="text/javascript">
	$("input:submit, input:button, button").button();
	$("#actualto").datepicker($.datepicker.regional['ru']);
	$("#actualto").datepicker('option', {dateFormat:'yy-mm-dd'});
	$("#commentForm").submit(function() {
		var cont = $("#comments").parent();
		$.post(
			$(this).attr("action"),
			$(this).serialize(),
			function(data) {
				$.get(
					'/catalog/products/comments/product/<?php echo $this->product->getAlias();?>/format/html',
					function(data) {
						$("#comments").slideUp('slow', function() {
							$("#comments").detach();
						});
						cont.html(data);
						$("#comments").slideDown('slow');
					}
				);
			}
		);
		cont.html('Добавление коментария...');
		return false;
	});

</script>
